package huu.phong.googlemusic.api;

import huu.phong.googlemusic.model.Song;

import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;


public interface IGoogleMusicAPI {
	
	public final String HTTPS_WWW_GOOGLE_COM_ACCOUNTS_CLIENT_LOGIN = "https://www.google.com/accounts/ClientLogin";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_SERVICES_SEARCH = "https://play.google.com/music/services/search";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_SERVICES_LOADALLTRACKS = "https://play.google.com/music/services/loadalltracks";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_SERVICES_LOADPLAYLIST = "https://play.google.com/music/services/loadplaylist";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_SERVICES_DELETEPLAYLIST = "https://play.google.com/music/services/deleteplaylist";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_SERVICES_ADDPLAYLIST = "https://play.google.com/music/services/addplaylist";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_PLAY_SONGID = "https://play.google.com/music/play?u=0&songid=%1$s&pt=e";

	public final String HTTPS_WWW_GOOGLEAPIS_COM_SJ_V1BETA1_TRACKS = "https://www.googleapis.com/sj/v1beta1/tracks";
	public final String HTTPS_WWW_GOOGLEAPIS_COM_SJ_V1BETA1_TRACKFEED = "https://www.googleapis.com/sj/v1beta1/trackfeed";
	
	public final String COOKIE_FORMAT = "?u=0&xt=%1$s";
	public final String GOOGLE_LOGIN_AUTH_KEY = "Authorization";
	public final String GOOGLE_LOGIN_AUTH_VALUE = "GoogleLogin auth=%1$s";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_LISTEN = "https://play.google.com/music/listen?hl=en&u=0";
	public final String HTTPS_PLAY_GOOGLE_COM_MUSIC_SERVICES = "https://play.google.com/music/services/";
	
	void login(String email, String password) throws LoginException, IOException;

	List<Song> getAllSongs() throws IOException, URISyntaxException;

	String getSongURL(Song song) throws URISyntaxException, IOException;
}
